package com.hxkj.dao.impl;

import com.hxkj.dao.WebsiteAddrDao;
import com.hxkj.domain.po.WebsiteAddr;
import com.hxkj.mapper.WebsiteAddrMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* cms静态文件规则表数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-08-01 10:06:12
*
*/
@Service("websiteAddrDao")
public class WebsiteAddrDaoImpl implements WebsiteAddrDao {

    @Resource
    private WebsiteAddrMapper websiteAddrMapper;

    @Override
    public WebsiteAddr selectByTargetName(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.selectByTargetName(websiteAddr);
    }

    @Override
    public List<WebsiteAddr> getWebsiteAddrBySiteId(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.getWebsiteAddrBySiteId(websiteAddr);
    }

    @Override
    public WebsiteAddr get(Long addrId) {
        return websiteAddrMapper.selectByPrimaryKey(addrId);
    }

    @Override
    public List<WebsiteAddr> get(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.select(websiteAddr);
    }

    @Override
    public int delete(Long addrId) {
        return websiteAddrMapper.deleteByPrimaryKey(addrId);
    }

    @Override
    public int delete(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.delete(websiteAddr);
    }

    @Override
    public int save(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.insert(websiteAddr);
    }

    @Override
    public int update(WebsiteAddr websiteAddr) {
        return websiteAddrMapper.update(websiteAddr);
    }
}
